private void encode(String message)
	{
		int index = 0;
		// initialize dictionary w/ single symbols
		for(int i = 0; i < message.length(); i++)
		{
			if(i + 1 == message.length())
			{	
				if(!dictionary.containsKey(message.substring(i)))
					dictionary.put(message.substring(i), index++);
			}
			else 
			{
				if(!dictionary.containsKey(message.substring(i, i + 1)))
					dictionary.put(message.substring(i, i+1), index++);
			}
		}
		
		// search for longest sequence
		int subcount = 1;
		for(int j = 0; j < message.length(); j+=subcount)
		{
			if(!(j + 1 >= message.length()))
			{
				subcount = 1;
				while(dictionary.containsKey(message.substring(j, j+subcount)))
				{
					subcount++;
				}
				if((dictionary.size() < size))
					dictionary.put(message.substring(j, j+subcount), index++);
				output.add(dictionary.get(message.substring(j, j+(subcount-1))));
				
				subcount--;
			}
			else
			{
				output.add(dictionary.get(message.substring(j)));
			}
		}
		
		printEncodedDictionary();
	}