return value and index in iter