file reading and win condition