added mongo functionality