Using lists and loops