Initial code which shows the resample error