same but with previous test code in main, rolled up into objects.