added: dump a tree into an array (method toArray())
fixed nodes count