tried to parallelize the program with OpenMP, yet still have some bugs