daemon start refactered