public static void main(String[] args)
  {
    TweetLoader mainLoader = new TweetLoader();
    Properties p = new Properties();
    try{
      p.load(new FileInputStream("configProperties/ApplicationConfiguration.properties"));
    }catch(Exception ex)
    {
      traceHandler.getLogger().log(Level.ERROR, "Error on loading properties into system");
    }
    
    Integer eventId = null;
    if(args != null && args.length == 1)
    {
      //eventId on position 1
      eventId = Integer.valueOf(args[0]);
    }else if(args != null && args.length > 1)
    {
      traceHandler.getLogger().log(Level.ERROR, "Wrong count of program arguments. Only an eventId will be accepted!");
      System.exit(1);
    }
    
    // initialize the twitter api
    TweetDatabaseConnector connector = TweetDatabaseConnector.getOnlyInstance();
    mainLoader.initTwitterStream((String) p.get("consumerKey"),
				 (String) p.get("consumerSecret"),
				 (String) p.get("accessToken"),
				 (String) p.get("accessTokenSecret"));
    
    List<Event> allEvents = connector.readEventObjects(eventId);
    
    if(allEvents.isEmpty())
      traceHandler.getLogger().log(Level.INFO, "No events in the system to process new tweets");
    
    for(Event event : allEvents)
    {
      try{
        // start the event process (query tweets ..)
        mainLoader.processEvent(event, true, connector);
      }catch(TwitterException e)
      {
	break;
      }
    }
    
    mainLoader.processSentimentEvaluation(connector);
  }