Added frame rate calculation