joe programmed for loop