Metal uptake by chitosan derivatives and structure studies of the polymer metal complexes