added a reset() method to cpu.py