added unit testing (not much I can test though)
set cmenu state p*prior* to thread starting