make state changes persist