Code calls reader.getNextRating() twice. Probably wrong behavior, and should call only once.