Added setFrameRate function