added functionality for compiling again to update table of contents