added solution to deep comparison