implemented WMF with biases