Adds checkAnagrams method