test code for updating polygons