finished first implementation of the broker