Modified main() in Main