cleaned up ch4 and ch7
fixed all of ch7 except 7.2
fixed stat_function loop issue
cleaned up files