fixed a bug
added a test case to andOrTag()
1) separate case 1 of andOrTag() into a helper andOrTagCase1Helper(). 2) Fixed several bugs in the helper
added some log msg