Trying previous solutions agian
Somewhat optimized
Somewhat optimized
Properly filtering indexes
Properly filtering indexes