writing code to parse a given pgn file