improved a working sender and daemon program