updated encoding class.