error handling added. game() returns game log