refactoring initialize