Refactored arrowhead exercise to conform with rules