refactor init methods