updated the code to write out the script properly for behavirla clusters and data edges