command encoding and response decoding is working now