a priority-queue module and some TAP for it