refactor booting.