fix code for new mongo db and use of elasticbeanstalk