refactoring init call