Implement index feature, close #5