add option to control refresh rate