removed createWorker function and moved guid function outside of the return