First sort-working bootstrap function