Simplify getting index