normalize unit length and add numbers in squares