refactoring
refactored initialization and configuration