implement container clipping