minor point -- you generally don't want to name something "list", as is shadows the list built-in. make_list or something would be better.