make a modified version of greedymrs_record.m