fixed various typos and syntax problems