finishing db work