add diff method and tests