first pass of worker and bootstrapping code