refactor init()