added check for relationship direction
Merge pull request #26 from kmussel/master

added check for relationship direction