Code for MDR demo