changed watch function