public static void insertAtPos(IntNode head, int pos, int value)
   {
       IntNode ptr = head;
       IntNode position;
      // IntNode newnode = new IntNode(value, head);
       
       position = listPosition(head, pos);
       if(position.link != null)
       {//when put new node between required place and its next.
    	   IntNode newNode = new IntNode(value, position.link);
    	   System.out.println("inside of method if is true");
    	   System.out.println(newNode.toString());
    	   
    	   
    	   
       }
       else
       {//required place is not in between
    	   position.addNodeAfter(value);
       }
    	  
       
       
       System.out.println("inside of inserAtPos");
       System.out.println(position.toString());
       System.out.println("end");
       

      /**
       if(pos <= 0)
       {
           throw new IllegalArgumentException(" position is less than 1.");
       }
       else
       {
    	   
    	   
            if(ptr != null){
                
                ptr = ptr.getLink(); 
            }
       }   
       */
   }//insertAtPost