A copy of AMH, modify some software to fit my need