updated solution for deep_comparison.js