@Override
	public Object display( IConnection connection ) {

		connection.write( "\n" + message );
		for (int i = 0; i < options.size(); i++) {
			connection.write( "\n [" + i + "] " +  options.get( i ).text );
		}
		
		boolean found = false;
		Object result = null;
		
		while ( !found ) {
			
			connection.write( "\n> ");
			
			String input = connection.read();
			
			try {
				int choice = Integer.parseInt( input.trim() );
				if ( choice < 0  || choice > options.size() - 1) throw new Exception();
				
				result = options.get( choice ).value;
				if ( result == null ) {
					result = parent.display( connection );
				} 
				
				found = true;
				
			} catch ( Exception e ) {
				connection.write( "\nEnter a valid number!");
			}
		}
		
		return result;
	}