main function story