partial merge of pull request traxtech/mpdmc#1