add findMaxMatch and cutMM