Code review after issue 2

middle in dao design