consolidate stuff into a _bootstrap function