setting up DB communication