corrected some typos, changed the appendix