added encoder for commands and test.