totally working master bootstrap script