optimize rendering code