refactored init behavior