Implemented a callback option.

See #11
Merge pull request #12 from johngeorgewright/callback

Implemented a callback option. See #11.