added square root function