Working parallel implementation