added some simple database interaction