setting initializer and refactoring