implementing consistency check in the Writer class #34