use constants for command codes
use utf8 in prepare packet