md diagram