adds conditional clause for get_directions