fixed typos and semantic errors