computeWeight