updating rendering code