more modularizing, and added code to create some tables to setup.  will add code to delete them in counter2