refactored code into getStringContainerEl