rewire a bit of the cake pattern stuff to help in testability