implemented list_partition()