start to communicate with other threads
remove logging
rename wrt capitals
tidy slighlty
keep code in worker as an array until it goes into the blob