RankedMA implementation