added sqrt solution