fix some bugs
begin generating data
fix the appendix