implemented checkSqrt function to use sigfigs