update a registerMethod() example