refactored watcher