skel code for db work