big change

took out sub loop - now you pass subid and data_dir to the command line