with array in main