Add method to connect to db