implemented encoding support for clients