created polygon class