Finished up loadState() method