saving daemon and getting from mongo
daemon completed. refactors