public Game createNewGame(Game game) {
		try {
			Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
			String url = "jdbc:derby:" + DBName;
			Connection connection = DriverManager.getConnection(url);
			Statement statement = connection.createStatement();
			
			PreparedStatement pstmt = connection.prepareStatement(
					"INSERT INTO GAMES (pmid) VALUES (" + game.getPlaymode().getPmID() + ") ", 
				      new String[] { "GID"} ); 

			pstmt.executeUpdate();
			ResultSet rs = pstmt.getGeneratedKeys();
			int gid = -1;
			if(rs.next()){
				gid = rs.getInt(1);
			}
			game.setGID(gid);
			for (Team team : game.getPlaymode().getTeams()) {
				for (User user : team.getUser()) {
					statement.executeUpdate("INSERT INTO GameUserRelationships (gid, uid, pmtid) VALUES (" + gid + ", " + user.getID() + ", " + team.getPmtID() + ")");
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return game;
	}