Adding the function for watched variables