basic polygon rendering and awkward test code implemented