public void handle() throws Exception{
		//System.out.println("in the commandHandle");
		if (!isGoodCommand())
			falseCommand();
		else{
			Thread cmdThread=null;
			// it's a get command, download a data item
			if (cmd.startsWith("get")){
				
				String []s=cmd.split(" ");
				int searchId=Integer.parseInt(s[1]);
				Search search=new Search(searchId);
				search.startSearch(1);
				
			}
			//ls command, display the finger table
			else if (cmd.startsWith("ls")){
				LS ls=new LS();
				ls.list();
				}
			//search command, search the key in the ring
			else if (cmd.startsWith("search"))
				{String []s=cmd.split(" ");
				 int searchId=Integer.parseInt(s[1]);
				 Search search=new Search(searchId);
				 search.startSearch(0);
				}
			//join command, join in a ring
			else if (cmd.startsWith("join"))
				{String []s=cmd.split(" ");
				Join join=null;
				if (s.length>1)
				{String join_ip=s[1];
				 int join_port=Integer.parseInt(s[2]);
				 join=new Join(join_ip,join_port);	
				}
				else
				join=new Join(Peer.DEFAULT_DEST_IP,Peer.DEFAULT_DEST_PORT);
				
				join.startJoin();
				
				}
			//le command, leave the ring
			else if (cmd.startsWith("le"))
				{Leave leave=new Leave();
				leave.start_leave();
				 }
			else
				{System.out.println("input command is bad");
				 return;
				}
			//cmdThread=new Thread();
			//System.out.println("begin to handle cmd: "+cmd);
			//cmdThread.start();
		}
		
	}