EMgame write by Wei-Chun Jian