working on scheduler and priority queue