Diff operation

Added tests to #179