added encodeModified