loops lists and list elements