mongoose enhanced by Chris Roughley
_