update render function