Add some callback methods.

I think it ​will be more better if apply ​this change.