watch mode refactoring