Working anagram. Needs some cleanup
Moved declaration out of filter callback