added tag class methods and unit test