updated with parallel mode