borrow an idea from elly's solution: we don't need separate copies of each function in order to treat jokers differently, we can just replace the Js with a different letter