only printing names with array index