add calculateAngle method