add parallel code