added ability to set priority to tasks