Simplified the index part