add tornado main function