add back in template token functions