Finally a version that builds the relation and arr.
added a non-working search