test of polygon matching