added comments in downsampling