added sqrt function