made more progress in main. Program is still not functional