add encoding save feature