finishing range-mapping and improving template with code block and toc