public void update(long deltaMs) {
        //System.out.println(currentState);
        // delete actors that were destroyd after the last update via events
        for(long a : toDelete) {
            deleteActor(a);
        }
        toDelete.clear();
        for(GameActor a : created) {
            actors.put(a.getID(), a);
        }
        created.clear();
        
        // game unitialized, an error has occured!
        if(currentState == GameState.UNINITIALIZED) {
            System.out.println("Game unitiliazied! Quitting.");
            Application.get().quit();
        }
        if(currentState == GameState.INITIALIZED) {
            // if we have only just initialized the game, go to main menu
            Application.get().getEventManager().queueEvent(new GameStateChangeEvent(GameState.MAIN_MENU));
        }
        if(currentState == GameState.PLAYING) {
            for(GameActor a : actors.values()) {
                a.update(deltaMs);
            }

            if(game != null) {
                game.update(deltaMs);
            }

            if(physics != null) {
                physics.update(deltaMs);
            }
        }
    }