fixed error in main