some more db interaction stuff added