public void run() {
		while (true) {
			// get the prices every 2 minutes and update them
			myStocks = DataReader.getStocks();
			DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
			Date date = new Date();
			System.out.println("Last updated stocks at "
					+ dateFormat.format(date));
			if (myStocks != null) {
				for (Stock e : myStocks) {
					int index = myStocks.indexOf(e);
					e.setPrice(price(e.getTickername()));
					myStocks.set(index, e);
				}

				// write the values to the file
				Writer.writeStockValues(myStocks);

				// let the updater sleep for 2 minutes
				try {
					Thread.sleep(120000);					
				} catch (InterruptedException e1) {					
					e1.printStackTrace();
				}
			}
		}
	}