changed framesPerSecond from Int to Double