primitive table of contents logic