Metal ion biosorption on chitosan for the synthesis of advanced materials