priority round robin algo corrected