extended codes for coefTokenMapping and fixed bug in up-reference