solution to tag search