fixed parallel version, even though it has a bad performance.