some docstring and typos