amended rendering loop, and renderer!