generating commands into bytes