deleted old prototyping code
multiprocessing implementation