ordering by date, priority