implement toc data generation