use replica set method of connection