Change ordering to allow ordering by multiple attributes