Made sorting changes