init refactor