fix some typos and added more comments