Utility function for adding tags