remove mongoose dependency and change the initial function
throw errors when the conn param is not provided