saves and reads game from db