playing around with resistance function from nz