rearranging the example program to look nicer