some typos and lil code beauty