added square root functionality