better frameRate implementation