added a method to mydaemon run