added a square root function