final python scripts first for  whole html and other for profiling