merged branch "get index working properly"