refactored tag template
refactored tag template a bit further