before merging recursive