final refactor init