implemented depth 5 for harmonize()