Sort of works!  Kind of off for the outputs and gets stuck in file reading.