Square Root algorithm