idxLogical now created with list comprehension