added some utility functions and skeletons for watch functions