avoid duplicate connection to mongo