public void decodeAndRender(int id, String message) throws JSONException {
		switch (id) {
		case 100: // Message.java
			Message chatMessage = enc.chattMessageDecode(message);
			lg.chatgui.chatUpdate(chatMessage.message, chatMessage.user);
			break;

		case 101: // Create session

		case 102: // Join session
			this.saveMsg = new StageFlipper(enc.joinMessageDecode(message));
			this.loop = false;
			break;

		case 103: // LobbyClientMessage.java/LobbyServerMessage.java
			LobbyServerMessage ls = enc.lobbyServerMessageDecode(message);
			lg.updateJTable(ls.UserList);
			break;
		default:
			System.out.println("something went wrong! Error code: " + id + "\nMessage: " + message);
		}

	}