added parallel computation