extracted Nproc method