sending commands synchronously