removed sqrt calculation