minimogrify - working version of mm implementation