paralleling code added