decode & modify the encode