Added refresh rate as an argument