Better syntax and added sqrt