move mm table computation into own method