added state restore capabilities