created a looping flow for the console application
a few formattting changes