made more debuggable by converting anonymous functions to named funcs
updating README