further clean up on the code on dao