implements non-tested parse and index code.