changes in main function