learning the with-redefs function, very handy...