added tag functionality
tested and fixed tag printing functionality