Rewrite tag-extract as a class
its working nicely