get code for createSpanningTreeHere in better shape
include ptr in chunk2str