Port by liu
Merge pull request #1 from zixuanl/master

Port by liu