fixed anagram stuff and added some back logic