added patch to provide the perSecond render func