switch to C based tag function