create and call main function