implemented depth 4 for harmonize()