better handling of pivot columns in place