get_next_data and get_previous_data