connect to db.