minor changes and fixes in db work
new tests