Minor MDH dynamics algorithm optimization