start main function