added missing import for multiprocessing packages, pep8ified code