anagram refact static handler