refactor dao to be an interface.