added support for multiple polys