add option for attributes to be moved to end ('last')