`newf` is defined when `reset` is called. So I guess this should be moved below the `reset` call below.