added resample in test