Added priority scheduler