It doesn't look like you need the element indices for anything.