got the rendering code working not too bad, ready to tidy it up and finish it off.