added web worker code