starting major rewrite of rendering code