rewrite pool to use processes instead of threads, fixing pickling errors