make sure get_data is used as an iterator