I don't know why, but when I use match in a function with words against a word input from a function, it works sometimes and sometimes it doesn't. I gave up on it and use a global enum for input. I've checked the spelling. I can't find anything different about it.