added high priority first mode