document the watch() function