commands dao refactoring