finish bootstrap function