tree diamer with adding nodes