attempting to make process parallel with joblib
parallel now works, required making pickleable functions
cleaninig up