Added max-product version of BP