added internal model that enables indexing. working on #4