more deriviation of Sod's problem. rearrange the code layout and style