Issue #9 added hook methods

See examples/mongo.js for further reference