direction calculation turned around