Change print method to include each_with_index iteration