moved DB stuff into db/