added calculation of frames per second