add some bits to get mock and the rest to work