used mod ( % ) to loop index.