added options to turn auto refresh on and off