improve errorWeight