more database stuff

please check me @danrschlosser