changed the way the commands are sent to the device