Turn pureM into a function
Merge pull request #1651 from Melvar/pureM-function

Turn pureM into a function