support callbacks.
Merge pull request #10 from stephenplusplus/master

Support callbacks