flatten much faster