Use HashSet for list of Materials to check for rather than an array