public void run(int action, int dbType, int realmMultiplier, int numOfRealmsToCreate) throws Exception
	{
		// initialize 
		System.out.println("starting createandpopulate running action "+action);
		
		// get mongo connection 
		MongoFactory mf = new MongoFactory();
		Mongo mongo = mf.getConnection("192.168.23.28", 27017);
		mongo.setWriteConcern(WriteConcern.SAFE);
		System.out.println("got mongo connection");
		
		Connection mysql = null;
		Connection mssql = null;
		
		if (dbType == MYSQL)
		{
			MySqlFactory mySqlF = new MySqlFactory();
			mysql = mySqlF.getConnection("192.168.23.28", "<db>", "<user>", "<pass>");
			System.out.println("got mysql connection, closed? "+mysql.isClosed());
		} 
		else if (dbType == MSSQL)
		{
			SqlServerFactory msSqlF = new SqlServerFactory();
			mssql = msSqlF.createConnection("192.168.23.114", "whatcounts", "sa", "dev=horse.play");
			System.out.println("got mssql connection, closed? "+mssql.isClosed());			
		}
		
		// get Database object
		Database db = new Database(realmMultiplier, numOfRealmsToCreate);
		
		System.out.println("start working at " + new java.util.Date());
		
		// create data
		if (action == CREATE_RDBMS)
		{
			createRDBMS(dbType, mysql, mssql, db);
		}
		else if (action == CREATE_MONGO)
		{
			createMongo(dbType, mongo, mysql, mssql, db);
		}
		else if (action == CREATE_ALL)
		{
			createAll(dbType, mysql, mssql, mongo, db);
		}
		else if (action == CLEAN_RDBMS)
		{
			cleanRDBMS(dbType, mysql, mssql);
		}
		else if (action == CLEAN_MONGO)
		{
			cleanMongo(mongo, db);
		}		
		else if (action == CLEAN_ALL)
		{
			cleanAll(dbType, mysql, mssql, mongo, db);
		}
		
		System.out.println("done working at " + new java.util.Date());
		
		// close connections
		try
		{
			mongo.close();			
			mysql.close();
			mssql.close();
		}
		catch (Exception e)
		{
		
		}
	}