Adds onRender method