normalize order before output