removed unnecessary code in main