Element Lokation From Mass

Hey guys, im a bit of noob with dynamo. And ive created a script which generate a location based on if an obejts does intersect with a Mass and then writes the result to the objects. My problem is i can’t figure out how to do this on more than one Mass at the time.
Im sure this has something to do with me filtering the list of Masses wrong. Here is my graph.