updated pstat return code - untested