Add beforeRender()