NEW: new function for resampling (uses c3d) + testing