Add UpdateDictionary and SquaredDifference methods