public String findRandom()
	{
		// string to return results with
		String result = "";
		// randomiser for finding a random number
		Random random = new Random();

		// a random entry can only be found if there exists a tree
		if(treeSize>0)
		{
			// this number represents the number of traversals to be executed
			int downs = random.nextInt(treeSize);
			// this number determin es whether or not to traverse left or right
			int direction = downs%2;
			Node newNode = rootNode;

			// if the number of traversals are more than 0 enter the statment
			// otherwise return the data contained in the root node
			if(downs > 0)
			{
				// iterate through the tree until a leaf is reached or the specified 
				// traversals have been traversed
				for(int i = 0 ; i < downs ; i ++)
				{
					// this produces a value of either 0 or 1. to specify left or right
					direction = random.nextInt(treeSize)%2;
					if(direction == 0)
					{
						if(newNode.hasRight())
							newNode = newNode.getRight();
						else
						{
							if(newNode.hasLeft())
								newNode = newNode.getLeft();
							else
							{
								result = newNode.getData().toString();
								break;
							}
						}
					}
					else
					{
						if(newNode.hasLeft())
							newNode = newNode.getLeft();
						else
						{
							if(newNode.hasRight())
								newNode = newNode.getRight();
							else
							{
								result = newNode.getData().toString();
								break;
							}
						}
					}
				}
			}
			else
				result = newNode.getData().toString();
		}

		// return the result if one was found
		return result;
	}