to_list in plisttree and compiling beam as separate function