renamed framerate variable to frameDuration, since that makese way more sense