public double[][] extract(String column){
		//Initializing, counting rows
		int count = 0;
		double[][] temp = new double[NUM][2];
		try{
			ds = new DataSet();
			ResultSet du = ds.executeQry("SELECT COUNT(*) AS rowcount FROM data");
			du.next();
			count = du.getInt("rowcount") ;
			du.close() ;
		}
		catch(Exception e){
			e.printStackTrace();
		}
		count-=NUM;
		ResultSet trs = null,prs = null;
		try{
			// Get times.
			trs = ds.executeQry("SELECT time FROM data " + "LIMIT " + NUM +" OFFSET " + count);
			String[] rawtime = new String[NUM];
			while(trs.next()){
				rawtime[trs.getRow()-1] = trs.getString(1);
			}
			temp[0][0]=0;
			long mintime = convert(rawtime[0]);
			for(int i=1;i<NUM;i++){
				temp[i][0] = convert(rawtime[i])-mintime;
			}
			//Get data.
			prs = ds.executeQry("SELECT " + column +" FROM data " + "LIMIT " + NUM + " OFFSET " + count);
			while(prs.next()){
				temp[prs.getRow()-1][1]=prs.getDouble(1);
			}
		}
		catch(Exception e){
			e.printStackTrace();
		}
		finally{
			try {
				ds.closeConnection();
				trs.close();
				prs.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
		return temp;
	}