assign weight