implemented fps calculation