code cleaning + toc