fixed algorithm so that materials are all added to each cloned cell in the geometry