refactoring initialize classes