added save/restore methods to handle configuration changes