Changed the detection of arguments in perform to using parameters instead of arity, so that if defined by a block, the result will be the same