refactored data source container to nested class