refactoring & bootstrap