change to exit(EXIT_SUCCESS)