adjust code in worker.js