add test cases and tag parsing