adapted scripts for running with multiprocessing, did not test yet