created and executed main function