changed to math.sqrt