even more comprehensive bootstrap script