Modified draw function in Polygon class