used pipe instead of queue in 'multiprocessing', cleaned up a little.