refactoring initialization