added new function to game.php