added frame rate calculation