rework of the daemon mode