some fixes, completed higher order funs