@Override
        public void run()
        {
            PrintWriter pout = null;
            String spotNumber = "";
            try
            {
                InputStream in = theSocket.getInputStream();
                OutputStream out = theSocket.getOutputStream();
                
                Scanner scan = new Scanner(in);
                pout = new PrintWriter(out, true);
                
                spotNumber = scan.nextLine();

                System.out.println(spotNumber);
                
                if(spotNumber.equalsIgnoreCase("security"))
                    runSecurityDisplay(scan, pout);
                else if(displayConnections.containsKey(spotNumber))
                    runParkingDisplay(scan, pout, spotNumber);
                
 
            }
                    
            catch( IOException e )
            {
                System.out.println( "Socket error: " + e + " " +
                                    theSocket.getRemoteSocketAddress( ) );
            }
            finally
            {   
                //removes the display from the list
                removeDisplay(spot.getParkingNumber(), spot);  
                try
                {
                    if( theSocket != null )
                        theSocket.close( );                    
                }
                catch( IOException e )
                {
                    System.out.println( "Socket error: " + e + " " +
                                    theSocket.getRemoteSocketAddress( ) );
                }

            }
        }