refactor bootstrap for cacheing