adding weights and center recomputing