tested
Merge https://github.com/mujingw/rmt