Added direction priority
Merge pull request #4 from dpbackes/master

Added direction priority