updated module to control the generation of frames