added command encoding