sort attributes