Optimized with idx 90s compartment.py