updated clearwatcher function