changed CGPointSquareLength to more appropriate CGPointSquareLengthFromOrigin