change to on-render