finish set.c based on list.c