modified so that ncpu can be set by users