refactor watch handling.