adding the code to create the DLM tree arrays.