added script for tree generation