Refactoring Sqrt