added watch (auto refresh) function