Simplifying index calculation