Client logic to accept commands