adding extractTags method and fixing #11