added automatic containment option