added method to print each item in array