added loop thru indexes