some typos and bugs