finalize refactor of initialize.