add mcs aggregate function