finished resampling module.  needs polishing