md25 refactored