object restructuration part 1: make polygone a class