refactored how arrows calculate
refactor