work in progress refactoring DAO/BAO