modified:   MRtools.py