added main function that just exports the computation into output files