refactor reinitialize