implemented dynamic frame rate