weights must be positive.