updated and added tests for tag spec.