fixed get_directions
merged