added even sorting