find square root using binary search