added example usage of the render event