extract object creation from container into factory
add factory test
needed a use