connect to db on construction