obviously we should factor this stuff so it's shared between cp & rcp, not to mention their different arity versions.