Rewrite the code for bootstrap usage