renamed functions, added actual framerate variable