rewrote renderer