line downsampling working