minor fixes to functions2