wait for command result before seding next command
create some helper code for sending commands to the server