added while loop to capture program list display