What would you think about renaming `contains` to something like `poetInPoem`, so that line 9 would read a little more clearly like `if (poetInPoem)`?  Not a big deal, it just took me a second to figure out what `if (contains)` meant.