added check for >= 1 main function in the program