porting v3 modify
Merge pull request #428 from htlxyz/master

porting v3 modify