the tag table should be of type int* not tag*.