Added refresh rate global variable