Extraction and modification of cellulose nanofibers derived from biomass for environmental application