add max iteration for sssp and cc