Added more base functionality - now to the actual function code for containment