update command function

Left to do: command_forward()