copied main to main2 in preparation of oop modifications