added functionality that dynamically creates the ordering of the game