added some worker code