this now works with mongoDB!