fixing CP function arity