move tag routine up in file for declaration order