week 8 WIP: maxFun and modification to foldTree