small modification to rendering, removed dead code