using modulo with each do loop