beforeRender added