added caption to tag functionality