upload resampling code