connect to the database