Add Tag Function and Unit Test