Edited the render2D method