added .resample.resids function