added state polygon func