protected void stepBackward() {

      CellElement currentCell;

      switch (m_currentPhase) {

         case PHASE_CALC_GRID:

            m_currentStep--;

            if (m_currentStep <= 0) {
               stepZero();
               return;
            }

            Point realD = getCoordsByStep(m_currentStep);
            currentCell = m_dpTable.getCell(realD.x, realD.y);

            // erasing pointers,
            // values, etc
            currentCell.clearAll();
            m_currentStep--;

            stepForward(true);

            break;

         case PHASE_BACKTRACK:

            currentCell = (CellElement) m_backTrackList.getLast();
            currentCell.clearColor();

            if (m_backTrackList.size() <= 1) {
               m_currentStep--;
               m_currentPhase = PHASE_CALC_GRID;
               m_backTrackList.clear();
               m_dpTable.clearInteractiveCells();
               stepForward(true);
            }
            else {

               m_backTrackList.removeLast();
               currentCell = (CellElement) m_backTrackList.getLast();
               currentCell.clearColor();

               if (m_backTrackList.size() == 0) {
                  m_backtrackLastSel = m_dpTable.getLastCell();
               }
               else {
                  m_backtrackLastSel = (CellElement) m_backTrackList.getLast();
                  m_backTrackList.removeLast();
               }

               // cut result string
               boolean toErase = false;
               for (int i = 0; i < 3; i++) {
                  if (m_resLine[i].length() > 1) {
                     m_resLine[i] = m_resLine[i].substring(2,
                         m_resLine[i].length());
                  }
                  else {
                     m_resLine[i] = "";
                     toErase = true;
                  }
               }

               if (toErase) {
                  m_bottomResultArea.setText("");
               }

               stepFWDBackTrack(true);
            }

            break;
      }

   }