adding mongo functionality