refctoring bootstrap to the version i know