got the correct precision from the calcSqrt function
added loop
core should be working, with the right precision