correction of error by sqrt2 and cosmetic changes