use defimpl
Merge pull request #242 from lidashuang/master

code should be protocol implementation