wrote method to parse PGN properly