private void removePars()
   {
       try{
       String inPars;
       boolean foundEndPars=false;
       int beginPars=0, endPars=0;
       while(beginPars!=-1&&endPars!=-1)
       {
           foundEndPars=false;
           beginPars=input.indexOf("(");
           endPars=beginPars;
           if (beginPars!=-1)
           {
           while(foundEndPars==false)
           {
               endPars++;
               switch(input.charAt(endPars))
               {
                   case '(':
                       beginPars=endPars;
                       break;
                   case ')':
                       foundEndPars=true;
                       break;
               }
           }
           inPars=input.substring(beginPars+1,endPars);
           //evaluate stuff in parentheses
           input=input.substring(0,beginPars)+evaluate(inPars+"=")+input.substring(endPars+1,input.length());
           //take care of --number resulting from -(number-biggerNumber)
           noMultipleNegatives();
           }
       }
       }catch(Exception e)
       {
           input="NaN";
       }
   }