cleanup, linkedlist traversal changed, pcb's indexed