Works lik a charm only with one array.