changed sub_list to work with collections