added mongodb functions