Changed connection to database