Adjusted loop in mash method.