added multiprocessing and signal handling