extract basic functions from daemon subpackage to process package as a basis