add get/setState methods for persisting and restoring presentation state