order of values returned by pairs() is not stable; adapt spec to pass for fields in arbitrary order