this looks like the main framework for sending commands