uses diff recursively