APL: old downsampling code removed