moved priority scheduling functions into a more obvious location