use a daemonize function