trim whitespace
First working version of the worker