dao refactoring: moved general methods to generic dao