added supports_optional_match method (#233)