Implemented a tag decoder