Add some callback methods.

I think it ​will be better if ​this change is applied.