working on priority-condvar