setup array and foreach