normalize ordering