Added priority scheduling