refactored a container object
modified tests to non-deprecated method.