public static DefaultTableModel getTableModel(Date date){
		
		Vector<Object> orders = new Vector<Object>(); // to return
		Vector<Object> orderRow = new Vector<Object>(); // a row
		Vector<Object> columns = new Vector<Object>(); // columns
		
		log.info("getting order table model");
		try {
			Connection conn = DBConnect.getConnection();
			ResultSet orderSet;
			orderSet = (date == null)?conn.prepareStatement("SELECT * from orders").executeQuery():
				conn.prepareStatement("SELECT * from orders WHERE date = " + date).executeQuery();
			ResultSetMetaData meta = orderSet.getMetaData();
	        int columnCount = meta.getColumnCount();
	        
	        //store column names  
	        for (int i = 1; i <= columnCount; i++) {
	            columns.add((meta.getColumnName(i).substring(0, 1).toUpperCase() + meta.getColumnName(i).substring(1)));
	            
	        }
	        columns.add("Drinks");
	        columns.add("Bill Total");
	        
			while(orderSet.next()){
				// get row content (order)
				orderRow = new Vector<Object>();
				{
					final int orderId = (Integer) Integer.parseInt(orderSet.getObject(1).toString());
					final Vector<Drink> drinksVec = getDrinks(orderId);
					// add elements of row
					orderRow.addElement( orderId );
					orderRow.addElement( (String) orderSet.getObject(2).toString() );
					orderRow.addElement( (Integer) Integer.parseInt(orderSet.getObject(3).toString()) );
					// list drinks from vector
					String drinks = new String();
					double orderTotal = 0.0;
					for(int i = 0; i < drinksVec.size(); i++){
						Drink current = drinksVec.get(i);
						drinks += current.getName();
						orderTotal += current.getPrice();
						if(i < drinksVec.size()-1) drinks += ", ";
					}
					orderRow.addElement(drinks);
					orderRow.addElement(String.format("$%.02f", orderTotal));
				}
				
				orders.addElement(orderRow);
			}
			
			// close connection
			orderSet.close();
			conn.close();
		}catch(SQLException e){
			log.error("SQLException: "+e.getStackTrace());
			e.printStackTrace();
		}catch(NumberFormatException e){
			log.error("NumberFormatException: "+e.getCause());
			e.printStackTrace();
		}finally{
			// keep going...
		}
		DefaultTableModel tableModel = new DefaultTableModel(orders, columns);
		
		log.info("got order table model");
		return tableModel;
	}