modified for use with mongolab and heroku