implementented workers and some parts of the controller