add extend method
Merge pull request #1 from zhanglin800/master

Add extend method