Connection to database works