reorder anagram detector methods