TODO: there are bugs in getShapeRect() or getBoudingBox()
take a look at them later