using arrays foreach