refactoring indexOf method
add object_id method as conditional to next_list_item method