added loadState() method - see test3.py