public function generate(TerminalStateInterface $currentState, TerminalState $desiredState) {

        // get a state object with anything that is changing
        $changes = $currentState->findChanges($desiredState);

        // if an object is returned, then just positive changes are occurring
        if ($changes) {
            
            // if there are really no changes
            if ($changes->isClear()) {

                // return an empty string
                return "";
               
            // there are some changes
            } else {

                // generate the sequence for the things that are actually changing
                return $this->generateSequence($changes, false);

            }


        // if null is returned, then something is getting turned off
        } else {

            // must generate a sequence with a clear
            return $this->generateSequence($desiredState, true);
        }



    }