more progress on a working database but not there yet, still have failing tests