adding to encoding functions
adding client