added priority sorting for inbox (only)