added enc/dec