Change output to work in a webworker