refactored direction package