refactoring objects creation