changed downsampling mapping to use sqrt