c-tag comparison helper code