more parallel code and use parallel loop