we are creating a sequence with the indexes then we loop over it and filter out where the condition is met