Update render function