refactored tag core data