implemented mongo functionality