dao imlementation refactoring