removed unused code in Main