working database intializing process, but still failing on tests due to refactoring