Refined main process but result is not correct yet in parallel version