finished priority scheduling