maked daemon. nothing changed. few code refactored