Implements diff method