improve center-weighting scheme
more caching
caching improvements