implemented list_free()