Parallelize serial code