changed to drawing polygons instead of rectangles.