refactored initialization block