attempting to fix the incomplete wadd function in mongo.js