refactoring + bootstrap