Imported from https://github.com/kevinduh/san_mrc