add test for list.flatten