read_list is refactored