Trying to abstract shape class