encoding of cmd works