check main function