optimize token assertion