fixing dao to move anonymous query stuff out to where it is specifically needed, in query and feed