Added database communication