added a socket connection to database