.resample.reb working for types 0 and 1