added code to build fresh game state