getting index on root