tag functionality moved to class