move mmm functionality to service