initialization refactored