method to filter array replicates