some simplification of curryN