added callbacks to diff engine
added asserts to unit test