An approach to understanding the deacetylation degree of chitosan