adding support for registering watchers