modified relative direction calculations