made it framerate independent