adding support for polygon