More code added to driver file (automate creation of cdf's