Working parallel version of dual graph generation