made the db work sorta kinda