used mongo functions to populate db