moving tilestoring to game.function