4. Optional: Automating with loops