added MMD code