Implemented observations to the sumProduct algorithm