refactor watcher.go