fixed addMethod()