fixed squareroot issue