Update diff-function