final version of mmi using closures - hopefully