fixed bootstrap function