added a solution for finding the square root