refactored tag dao