flatten children