added web-worker functionality.