Added code for frame rate