add resample method, reconstruct input data