improve geoWeightedSum algorithm and tables manage