re-adding onRender function