updated compile. print elements of array