loop over indices
comparing two objects