add saveForm and restoreForm methods