no resampling; threading fixed