Added function tagsByType