Sort with priority level