change internalEncoding to a property