flattening buttons