trying to index array and boolean