added some database stuff