main2 now works, with major bugs