added trim() to ignore whitespace on either side of item matching