public BotManager(final int num, long time, final URI uri, final int numMsg) {

			//this.r = new Random(Thread.currentThread().getId() + Config.MACHINE_SEED);
			//this.top = r.nextInt(Config.MAX_TOP);
			//this.left = r.nextInt(Config.MAX_LEFT);

			this.top = 0; //0 is just a hardcoded value so that I can see bots popping on the screen and disappear later on
			this.left = Config.MACHINE_SEED + num;

			// connect
			cc = new LogBot(this, num, time, uri, WebSocketDraft.DRAFT76);
			cc.connect();
			this.botid = num;

			// send	task
			doUpdatePosAndSend = new TimerTask() {
				@Override
				public void run() {
					updatePos();
					cc.send(getStrFromPos());
					numMsgSent ++;
					// log every LOG_FREQ msg
					if(numMsgSent % Config.LOG_FREQ == (Config.LOG_FREQ-1)) {
						cc.changeTrackedPositionAndLog(getTop(), getLeft());
					}			
					// flush every FLUSH_FREQ msg
					if(numMsgSent % Config.FLUSH_FREQ == (Config.FLUSH_FREQ-1)) { 
						cc.flushLog();
					}
					if(numMsgSent >= numMsg) { // I'm done sending all msg 
						timer.cancel();
						ctimer = new Timer();
						ctimer.schedule(doClose, num*Config.SLEEP_CLOSE);
					}
				}
			};
			// close task
			doClose = new TimerTask() {
				@Override
				public void run() {
					try {
						cc.close();
						ctimer.cancel();
					} catch (IOException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
				}
			};
		} 		//end of botmanager constructor