removed thread for connecting to database