Add Index and d some tests