update rendering code