calculates directions on last point added