Add get_next_entry method