allow an object to be given to create a worker

give an object of functions