fix check for respond_to?(:key?), add example matrix