add some code to test priority scheduler
fix bug of priority scheduler