fn on line 12 is invoked with 3 arguments. But the functions only expect 2 arguments.

So I changed it to confirm with the calling on line 12 and the commonJS spec (3 arguments, not 2).