removed region, added some polygon functions