container refactoring