start of priority scheduler
problems with hanging
priority working