sort structures upon submission to prevent craziness