moved mongo logic into digger core